package org.song.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.song.model.dto.UserDto;
import org.song.model.vo.User;
import org.springframework.lang.NonNull;

import java.util.List;

@Mapper
public interface UserMapper {

    List<User> listUsers( @NonNull UserDto userDto);

    Integer deleteUser( @NonNull User blog);

    Integer insertUser( @NonNull User blog);

    Integer updateUser( @NonNull User blog);

    User selectUser( @NonNull @Param( value = "creatorId" ) Long creatorId );

    /**
     * 根据用户名获取用户信息
     * @param username
     * @return
     */
    User getUserByUsername( @NonNull @Param( value = "username" ) String username );

}
